import { UserLayout, TabLayout, RouteView, BlankLayout, PageView } from '@/components/layouts'

/**
 * 走菜单，走权限控制
 * @type {[null,null]}
 */
export const asyncRouterMap = [

  {
    path: '/',
    name: 'dashboard',
    component: TabLayout,
    meta: { title: '首页' },
    redirect: '/cosystem/dashboard/workplace',
    children: [

      // // dashboard
      // {
      //   path: '/dashboard',
      //   name: 'dashboard',
      //   redirect: '/dashboard/workplace',
      //   component: RouteView,
      //   meta: { title: '仪表盘', icon: 'dashboard', permission: [ 'dashboard' ] },
      //   children: [
      //     {
      //       path: '/dashboard/analysis',
      //       name: 'Analysis',
      //       component: () => import('@/views/dashboard/Analysis'),
      //       meta: { title: '分析页', permission: [ 'dashboard' ] }
      //     },
      //     {
      //       path: '/dashboard/monitor',
      //       name: 'Monitor',
      //       hidden: true,
      //       component: () => import('@/views/dashboard/Monitor'),
      //       meta: { title: '监控页', permission: [ 'dashboard' ] }
      //     },
      //     {
      //       path: '/dashboard/workplace',
      //       name: 'Workplace',
      //       component: () => import('@/views/dashboard/Workplace'),
      //       meta: { title: '工作台', permission: [ 'dashboard' ] }
      //     }
      //   ]
      // },
      //
      // // forms
      // {
      //   path: '/form',
      //   redirect: '/form/basic-form',
      //   component: PageView,
      //   meta: { title: '表单页', icon: 'form', permission: [ 'form' ] },
      //   children: [
      //     {
      //       path: '/form/base-form',
      //       name: 'BaseForm',
      //       component: () => import('@/views/form/BasicForm'),
      //       meta: { title: '基础表单', permission: [ 'form' ] }
      //     },
      //     {
      //       path: '/form/step-form',
      //       name: 'StepForm',
      //       component: () => import('@/views/form/stepForm/StepForm'),
      //       meta: { title: '分步表单', permission: [ 'form' ] }
      //     },
      //     {
      //       path: '/form/advanced-form',
      //       name: 'AdvanceForm',
      //       component: () => import('@/views/form/advancedForm/AdvancedForm'),
      //       meta: { title: '高级表单', permission: [ 'form' ] }
      //     }
      //   ]
      // },
    ]
  },
  {
    path: '*', redirect: '/404', hidden: true
  }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [


  {
    path: '/user',
    component: UserLayout,
    redirect: '/user/login',
    hidden: true,
    children: [
      {
        path: 'login',
        name: 'login',
        component: () => import(/* webpackChunkName: "user" */ '@/views/cosystem/user/Login')
      },
      {
        path: 'editEmpoyee',
        name: 'editEmpoyee',
        component: () => import(/* webpackChunkName: "user" */ '@/views/cohrm/entry/entryprocess/EmployeeEdit')
      },
      {
        path: 'editCandidateInfo',
        name: 'editCandidateInfo',
        component: () => import(/* webpackChunkName: "user" */ '@/views/cohrm/entry/candidateInfo/editCandidateInfo')
      },
      {
        path: 'editHrEmployeeInfo',
        name: 'editHrEmployeeInfo',
        component: () => import(/* webpackChunkName: "user" */ '@/views/cohrm/employeeInfo/user/editHrEmployeeInfo')
      },
    ]
  },


  //import { TabLayout, RouteView, BlankLayout, PageView } from '@/components/layouts'
  {
    path: '/esign',
    component: BlankLayout,
    redirect: '/esign/esignReturnUrl',
    hidden: true,
    children: [
      {
        path: 'esignReturnUrl',
        name: 'esignReturnUrl',
        component: () => import(/* webpackChunkName: "user" */ '@/views/cosystem/user/esignReturnUrl')
      },
    ]
  },
  {
    path: '/upload',
    component: BlankLayout,
    redirect: '/upload/uploadApplets',
    hidden: true,
    children: [
      {
        path: 'uploadApplets',
        name: 'uploadApplets',
        component: () => import(/* webpackChunkName: "user" */ '@/views/cosystem/user/uploadApplets')
      },
    ]
  },

  {
    path: '/404',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/cosystem/exception/404')
  },

]
